package midas.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
	
	public static final SimpleDateFormat DEFAULT_DATE_FORMAT = new SimpleDateFormat("yyyy.MM.dd");

	public static String now(String pattern) {
		SimpleDateFormat formatter = new SimpleDateFormat(pattern);
		return formatter.format(new Date(System.currentTimeMillis()));
	}
	
	public static String now() {		
		return DEFAULT_DATE_FORMAT.format(new Date(System.currentTimeMillis()));
	}
}
